Computing systems and associated networks have revolutionized the way human beings work, play, and communicate. Computing systems rely on software for direction on how to operate. As applications run, they may create objects on a portion of system memory called the “heap”. However, for one reason or another, objects may outlive their utility on the heap. This may occur, for instance, if the application that created the object in the heap fails to release the object from the heap prior to closing. This may occur due to a coding oversight in the application, or due to a disorderly shutdown of the application.
Of course, the size of the heap is finite. Accordingly, to increase the odds that objects in the heap are being useful to one or more processes operating on the computing system, a component called a “garbage collector” scans the heap periodically to identify those objects that are being used (called “live objects”), and objects that are no longer being used (called “dead objects”). The garbage collector may remove the dead objects by considering the space they occupy as available for writing over.
Another operation of the garbage collector is to compact the objects so that there are larger portions of empty space available for placing objects yet to be created, and such that already created objects have a higher degree of adjacency. Such improves the performance of the computing system as a whole. Thus, garbage collectors determine which objects are live objects, and move those live objects around so as to make better usage of the heap. For any object that is moved, the garbage collector may also update the pointers for any objects that refer to that moved object, so as to properly refer to the new location of the moved object. The garbage collector may update the pointers either directly or with the aid of other components, such as a managed code environment.
Some objects, however, cannot be moved because there is no effective way to update the pointers of objects that reference the object. Accordingly, those objects may be pinned at that location in the heap, thus negating the need to update any pointers to that object. However, the number of pinned objects that cannot be moved by the garbage collector tends to be rather small compared to the number of unpinned objects that can be moved. Thus, garbage collectors conventionally just work around the few pinned objects when moving unpinned objects within the heap.
The subject matter claimed herein is not limited to embodiments that solve any disadvantages or that operate only in environments such as those described above. Rather, this background is only provided to illustrate one exemplary technology area where some embodiments described herein may be practiced.